<?php

if (validation_errors()) :
?>
<section class="content-header">
<div class='alert alert-block alert-error fade in'>
    <a class='close' data-dismiss='alert'>&times;</a>
    <h4 class='alert-heading'>
        <?php echo lang('buildings_errors_message'); ?>
    </h4>
    <?php echo validation_errors(); ?>
</div>
</section>
<?php
endif;

$id = isset($buildings->id) ? $buildings->id : '';

?>
<!-- Main content -->
<section class="content">
<style type="text/css">
    .form-group-m-b{margin-bottom: 15px;}
</style>
  <div class="row">
    <!-- form start -->
    <?php echo form_open($this->uri->uri_string(), 'class="form-horizontal" onkeydown="if(event.keyCode==13){return false;}"'); ?>
    <div class="col-md-8">


        <div class="box box-primary">
            <div class="box-header with-border">
              <h3 class="box-title">编辑<?php echo lang('buildings_area_title'); ?></h3>
            </div>
            <!-- /.box-header -->
            
              <div class="box-body">
                
                <div class="form-group">
                <?php echo form_label('楼盘名' . lang('bf_form_label_required'), 'name', array('class'=>'col-sm-2 control-label')); ?>
                    <div class="col-sm-10">
                    <input id='name' type='text' name='name' required='required' maxlength='100' class="form-control" value="<?php echo set_value('name', isset($buildings->name) ? $buildings->name : ''); ?>" />
                    </div>
                </div>
                <div class="form-group">
                <?php echo form_label('楼盘别称', 'nickname', array('class'=>'col-sm-2 control-label')); ?>
                    <div class="col-sm-10">
                    <input id='nickname' type='text' name='nickname' maxlength='100' class="form-control" value="<?php echo set_value('nickname', isset($buildings->nickname) ? $buildings->nickname : ''); ?>" />
                    </div>
                </div>
                <div class="form-group">
                <?php echo form_label('编号' . lang('bf_form_label_required'), 'code', array('class'=>'col-sm-2 control-label')); ?>
                    <div class="col-sm-10">
                    <input id='code' type='text' name='code' required='required' maxlength='100' class="form-control" value="<?php echo set_value('code', isset($buildings->code) ? $buildings->code : ''); ?>" placeholder="编号唯一" />
                    </div>
                </div>
                <div class="form-group">
                <?php echo form_label('楼盘均价', 'ave_price', array('class'=>'col-sm-2 control-label')); ?>
                    <div class="col-sm-10">
                    <input id='ave_price' type='text' name='ave_price' class="form-control" value="<?php echo set_value('ave_price', isset($buildings->ave_price) ? $buildings->ave_price : ''); ?>" />
                    </div>
                </div>
                <div class="form-group">
                  <?php echo form_label('400号码' . lang('bf_form_label_required'), 'telephone', array('class'=>'col-sm-2 control-label')); ?>
                    <div class="col-sm-10">
                        <input id='telephone' type='text' name='telephone' maxlength='100' class="form-control" value="<?php echo set_value('telephone', isset($buildings->telephone) ? $buildings->telephone : ''); ?>" />
                    </div>
                </div>
                <div class="form-group">
                <?php echo form_label('楼盘状态', 'status', array('class'=>'col-sm-2 control-label')); ?>
                    <div class="col-sm-10">
                        <select class="form-control select2" style="width: 100%;" name="status" id="status">
                        <?php foreach ($status = building_status() as $key => $obj) : ?>
                          <option value="<?php echo $key; ?>" <?php echo set_select('status', $key, (isset($buildings->status) ? $buildings->status : '')==$key); ?>><?php echo $obj; ?></option>
                        <?php endforeach; ?>
                        
                        </select>
                    </div>
                </div>
                <div class="form-group">
                <?php echo form_label('发布状态', 'publish', array('class'=>'col-sm-2 control-label')); ?>
                    <div class="col-sm-10">
                        <select class="form-control select2" style="width: 100%;" name="publish" id="publish">
                        <?php foreach ($publish = building_publish() as $key => $obj) : ?>
                          <option value="<?php echo $key; ?>" <?php echo set_select('publish', $key, (isset($buildings->publish) ? $buildings->publish : '')==$key); ?>><?php echo $obj; ?></option>
                        <?php endforeach; ?>
                        
                        </select>
                    </div>
                </div>
                <div class="form-group">
                <?php echo form_label('推荐理由', 'recommend_info', array('class'=>'col-sm-2 control-label')); ?>
                    <div class="col-sm-10">
                    <textarea id='recommend_info' name='recommend_info' class="form-control"><?php echo set_value('recommend_info', isset($buildingsInfoData->recommend_info) ? $buildingsInfoData->recommend_info : ''); ?></textarea>
                    </div>
                </div>
                <div class="form-group">
                <?php echo form_label('特色标签', 's_tags', array('class'=>'col-sm-2 control-label')); ?>
                    <div class="col-sm-10">
                        <select class="form-control select2" style="width: 100%;" name="s_tags[]" id="s_tags" multiple="multiple">
                        <?php foreach ($stags as $stag) : ?>
                          <option value="<?php echo $stag->tag_id; ?>" selected><?php echo $stag->tag_name; ?></option>
                        <?php endforeach; ?>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                <?php echo form_label('标签', 'tags', array('class'=>'col-sm-2 control-label')); ?>
                    <div class="col-sm-10">
                        <select class="form-control select2" style="width: 100%;" name="tags[]" id="tags" multiple="multiple">
                        <?php foreach ($tags as $tag) : ?>
                          <option value="<?php echo $tag->tag_id; ?>" selected><?php echo $tag->tag_name; ?></option>
                        <?php endforeach; ?>
                        </select>
                    </div>
                </div>
                <!-- <div class="form-group">
                <?php echo form_label('楼盘期数', 'period', array('class'=>'col-sm-2 control-label')); ?>
                    <div class="col-sm-10">
                        <select class="form-control select2" style="width: 100%;" name="period" id="period">
                        <?php foreach ($period = building_period() as $key => $obj) : ?>
                          <option value="<?php echo $key; ?>" <?php echo set_select('period', $key, (isset($buildings->period) ? $buildings->period : '')==$key); ?>><?php echo $obj; ?></option>
                        <?php endforeach; ?>
                        
                        </select>
                    </div>
                </div> -->

              </div>
              <!-- /.box-body -->

          </div>

          <!-- SEO -->
          <div class="box box-primary">
            <div class="box-header with-border">
              <h3 class="box-title">搜索引擎</h3>
            </div>
            <!-- /.box-header -->
            
            <div class="box-body">
                
                <div class="form-group">
                    <?php echo form_label('标题', 'seo_title', array('class'=>'col-sm-2 control-label')); ?>
                    <div class="col-sm-10">
                    <input id='seo_title' type='text' name='seo_title' maxlength='100' class="form-control" value="<?php echo set_value('seo_title', isset($buildingsInfoData->seo_title) ? $buildingsInfoData->seo_title : ''); ?>" />
                    </div>
                </div>
                <div class="form-group">
                    <?php echo form_label('关键词', 'seo_keywords', array('class'=>'col-sm-2 control-label')); ?>
                    <div class="col-sm-10">
                    <input id='seo_keywords' type='text' name='seo_keywords' maxlength='100' class="form-control" value="<?php echo set_value('seo_keywords', isset($buildingsInfoData->seo_keywords) ? $buildingsInfoData->seo_keywords : ''); ?>" />
                    </div>
                </div>
                <div class="form-group">
                    <?php echo form_label('描述', 'seo_description', array('class'=>'col-sm-2 control-label')); ?>
                    <div class="col-sm-10">
                    <textarea id='seo_description' name='seo_description' class="form-control"><?php echo set_value('seo_description', isset($buildingsInfoData->seo_description) ? $buildingsInfoData->seo_description : ''); ?></textarea>
                    </div>
                </div>
                
            </div>
              <!-- /.box-body -->
          </div>
          <!-- SEO end -->


          <!-- 通用信息 -->
          <div class="box box-primary">
            <div class="box-header with-border">
              <h3 class="box-title">通用信息</h3>
            </div>
            <!-- /.box-header -->
            <div class="box-body">
              <div class="row">
                <div class="col-md-6">
                    <div class="form-group-m-b">
                    <?php echo form_label('开盘时间', 'open_time', array()); ?>
                        <div class="input-group date">
                            <div class="input-group-addon">
                                <i class="fa fa-calendar"></i>
                            </div>
                            <input type="text" name="open_time" class="form-control datepicker" id="open_time" value="<?php echo set_value('open_time', isset($buildings->open_time) ? $buildings->open_time : ''); ?>" />
                        </div>
                    </div>
                  <!-- /.form-group -->
                    <div class="form-group-m-b">
                    <?php echo form_label('楼盘地址', 'address', array()); ?>
                        <input type="text" name="address" class="form-control" id="address" value="<?php echo set_value('address', isset($buildingsInfoData->address) ? $buildingsInfoData->address : ''); ?>" />
                    </div>
                  <!-- /.form-group -->
                  <div class="form-group-m-b">
                    <?php echo form_label('占地面积', 'floor_space', array()); ?>
                        <input type="text" name="floor_space" class="form-control" id="floor_space" placeholder="请填入数字，单位平方米" value="<?php echo set_value('floor_space', isset($buildingsInfoData->floor_space) ? $buildingsInfoData->floor_space : ''); ?>" />
                    </div>
                  <!-- /.form-group -->
                  <div class="form-group-m-b">
                    <?php echo form_label('容积率', 'rongji_lv', array()); ?>
                        <input type="text" name="rongji_lv" class="form-control" id="rongji_lv" placeholder="1.5" value="<?php echo set_value('rongji_lv', isset($buildingsInfoData->rongji_lv) ? $buildingsInfoData->rongji_lv : ''); ?>" />
                    </div>
                  <!-- /.form-group -->
                  <div class="form-group-m-b">
                    <?php echo form_label('规划户数', 'guihua_shu', array()); ?>
                        <input type="text" name="guihua_shu" class="form-control" id="guihua_shu" placeholder="1268" value="<?php echo set_value('guihua_shu', isset($buildingsInfoData->guihua_shu) ? $buildingsInfoData->guihua_shu : ''); ?>" />
                    </div>
                  <!-- /.form-group -->
                  <div class="form-group-m-b">
                    <?php echo form_label('车位比', 'chewei_bi', array()); ?>
                        <input type="text" name="chewei_bi" class="form-control" id="chewei_bi" placeholder="1:1.2" value="<?php echo set_value('chewei_bi', isset($buildingsInfoData->chewei_bi) ? $buildingsInfoData->chewei_bi : ''); ?>" />
                    </div>
                  <!-- /.form-group -->
                  <div class="form-group-m-b">
                    <?php echo form_label('装修情况', 'zhuangxiu_qk', array()); ?>
                        <input type="text" name="zhuangxiu_qk" class="form-control" id="zhuangxiu_qk" placeholder="叠加别墅：精装" value="<?php echo set_value('zhuangxiu_qk', isset($buildingsInfoData->zhuangxiu_qk) ? $buildingsInfoData->zhuangxiu_qk : ''); ?>" />
                    </div>
                  <!-- /.form-group -->
                  <div class="form-group-m-b">
                    <?php echo form_label('物业公司', 'wuye_gs', array()); ?>
                        <input type="text" name="wuye_gs" class="form-control" id="wuye_gs" value="<?php echo set_value('wuye_gs', isset($buildingsInfoData->wuye_gs) ? $buildingsInfoData->wuye_gs : ''); ?>" />
                    </div>
                  <!-- /.form-group -->
                    <div class="form-group-m-b">
                    <?php echo form_label('生活配套', 'life', array()); ?>
                        <input type="text" name="life" class="form-control" id="life" placeholder="" value="<?php echo set_value('life', isset($buildingsInfoData->life) ? $buildingsInfoData->life : ''); ?>" />
                    </div>
                    <!-- /.form-group -->
                    <div class="form-group-m-b">
                    <?php echo form_label('交通配套', 'traffic', array()); ?>
                        <input type="text" name="traffic" class="form-control" id="traffic" placeholder="" value="<?php echo set_value('traffic', isset($buildingsInfoData->traffic) ? $buildingsInfoData->traffic : ''); ?>" />
                    </div>
                    <!-- /.form-group -->
                    <div class="form-group-m-b">
                    <?php echo form_label('价格描述', 'price_desc', array()); ?>
                        <input type="text" name="price_desc" class="form-control" id="price_desc" placeholder="" value="<?php echo set_value('price_desc', isset($buildingsInfoData->price_desc) ? $buildingsInfoData->price_desc : ''); ?>" />
                    </div>
                    <!-- /.form-group -->
                    <div class="form-group-m-b">
                        <?php echo form_label('经度', 'lng', array()); ?>
                            <input type="text" name="lng" class="form-control" id="lng" placeholder="" value="<?php echo set_value('lng', isset($buildings->lng) ? $buildings->lng : ''); ?>" />
                    </div>
                </div>
                <!-- /.col -->
                <div class="col-md-6">
                    <div class="form-group-m-b">
                    <?php echo form_label('交房时间', 'pass_time', array()); ?>
                        <div class="input-group date">
                            <div class="input-group-addon">
                                <i class="fa fa-calendar"></i>
                            </div>
                            <input type="text" name="pass_time" class="form-control datepicker" id="pass_time" value="<?php echo set_value('pass_time', isset($buildings->pass_time) ? $buildings->pass_time : ''); ?>" />
                        </div>
                    </div>
                  
                  <!-- /.form-group -->
                    <div class="form-group-m-b">
                    <?php echo form_label('售楼地址', 'sale_address', array()); ?>
                        <input type="text" name="sale_address" class="form-control" id="sale_address" value="<?php echo set_value('sale_address', isset($buildingsInfoData->sale_address) ? $buildingsInfoData->sale_address : ''); ?>" />
                    </div>
                  <!-- /.form-group -->
                  <div class="form-group-m-b">
                    <?php echo form_label('建筑面积', 'all_space', array()); ?>
                        <input type="text" name="all_space" class="form-control" id="all_space" placeholder="请填入数字，单位平方米" value="<?php echo set_value('all_space', isset($buildingsInfoData->all_space) ? $buildingsInfoData->all_space : ''); ?>" />
                    </div>
                  <!-- /.form-group -->
                  <div class="form-group-m-b">
                    <?php echo form_label('绿化率', 'lvhua_lv', array()); ?>
                        <input type="text" name="lvhua_lv" class="form-control" id="lvhua_lv" placeholder="请填入数字，单位百分比" value="<?php echo set_value('lvhua_lv', isset($buildingsInfoData->lvhua_lv) ? $buildingsInfoData->lvhua_lv : ''); ?>" />
                    </div>
                  <!-- /.form-group -->
                  <div class="form-group-m-b">
                    <?php echo form_label('车位数', 'chewei_shu', array()); ?>
                        <input type="text" name="chewei_shu" class="form-control" id="chewei_shu" placeholder="请填入数字" value="<?php echo set_value('chewei_shu', isset($buildingsInfoData->chewei_shu) ? $buildingsInfoData->chewei_shu : ''); ?>" />
                    </div>
                  <!-- /.form-group -->
                  <div class="form-group-m-b">
                    <?php echo form_label('产权年限', 'chanquan_n', array()); ?>
                        <input type="text" name="chanquan_n" class="form-control" id="chanquan_n" placeholder="请填入数字" value="<?php echo set_value('chanquan_n', isset($buildingsInfoData->chanquan_n) ? $buildingsInfoData->chanquan_n : ''); ?>" />
                    </div>
                  <!-- /.form-group -->
                  <div class="form-group-m-b">
                    <?php echo form_label('装修标准', 'zhuangxiu_bz', array()); ?>
                        <input type="text" name="zhuangxiu_bz" class="form-control" id="zhuangxiu_bz" placeholder="4000.00元/平米" value="<?php echo set_value('zhuangxiu_bz', isset($buildingsInfoData->zhuangxiu_bz) ? $buildingsInfoData->zhuangxiu_bz : ''); ?>" />
                    </div>
                  <!-- /.form-group -->
                  <div class="form-group-m-b">
                    <?php echo form_label('物业费', 'wuye_fei', array()); ?>
                        <input type="text" name="wuye_fei" class="form-control" id="wuye_fei" placeholder="3.3元/平米/月" value="<?php echo set_value('wuye_fei', isset($buildingsInfoData->wuye_fei) ? $buildingsInfoData->wuye_fei : ''); ?>" />
                    </div>
                  <!-- /.form-group -->
                  <div class="form-group-m-b">
                    <?php echo form_label('教育配套', 'education', array()); ?>
                        <input type="text" name="education" class="form-control" id="education" placeholder="" value="<?php echo set_value('education', isset($buildingsInfoData->education) ? $buildingsInfoData->education : ''); ?>" />
                    </div>
                    <!-- /.form-group -->
                    <div class="form-group-m-b">
                    <?php echo form_label('医疗配套', 'hospital', array()); ?>
                        <input type="text" name="hospital" class="form-control" id="hospital" placeholder="" value="<?php echo set_value('hospital', isset($buildingsInfoData->hospital) ? $buildingsInfoData->hospital : ''); ?>" />
                    </div>
                    <!-- /.form-group -->
                    <div class="form-group-m-b">
                    <?php echo form_label('主力户型', 'main_hx', array()); ?>
                        <input type="text" name="main_hx" class="form-control" id="main_hx" placeholder="" value="<?php echo set_value('main_hx', isset($buildingsInfoData->main_hx) ? $buildingsInfoData->main_hx : ''); ?>" />
                    </div>
                    <!-- /.form-group -->
                    <div class="form-group-m-b6">
                    <?php echo form_label('纬度', 'lat', array()); ?>
                        <input type="text" name="lat" class="form-control" id="lat" placeholder="" value="<?php echo set_value('lat', isset($buildings->lat) ? $buildings->lat : ''); ?>" />
                    </div>
                </div>
                <!-- /.col -->
              </div>
              <!-- /.row -->
            </div>
            <!-- /.box-body -->
            <!-- <div class="box-footer">
              Visit <a href="https://select2.github.io/">Select2 documentation</a> for more examples and information about
              the plugin.
            </div> -->
            <div class="box-footer">
                <button type="submit" name='save' class="btn btn-primary">Submit</button>
                <?php echo anchor(SITE_AREA . '/content/buildings', lang('buildings_cancel'), 'class="btn btn-default pull-right"'); ?>
              </div>
          </div>
          <!-- /.box -->




        </div>

        <div class="col-md-4">

        <div class="box box-primary">
            <div class="box-header with-border">
              <h3 class="box-title">城市</h3>
            </div>
            <!-- /.box-header -->
            <div class="box-body form-horizontal">
                <div class="form-group">
                  <?php echo form_label('国家', 'country_id', array('class'=>'col-sm-3 control-label')); ?>
                    <div class="col-sm-9">
                        <select class="form-control select2" style="width: 100%;" name="country_id" id="country_id">
                          <option selected="selected" value="0">可选择国家</option>
                          <?php foreach ($country as $country) : ?>
                          <option value="<?php echo $country->area_id; ?>" <?php echo set_select('province_id', $country->area_id, (isset($buildings->country_id) ? $buildings->country_id : '')==$country->area_id); ?>><?php echo $country->area_name; ?></option>
                        <?php endforeach; ?>
                        </select>
                    </div>

                </div>
                <div class="form-group">
                  <?php echo form_label('省份', 'province_id', array('class'=>'col-sm-3 control-label')); ?>
                    <div class="col-sm-9">
                        <select class="form-control select2" style="width: 100%;" name="province_id" id="province_id">
                          <option selected="selected" value="0">可选择省份</option>
                          <?php foreach ($provinces as $province) : ?>
                          <option value="<?php echo $province->area_id; ?>" <?php echo set_select('province_id', $province->area_id, (isset($buildings->province_id) ? $buildings->province_id : '')==$province->area_id); ?>><?php echo $province->area_name; ?></option>
                        <?php endforeach; ?>
                        </select>
                    </div>

                </div>
                <div class="form-group">
                  <?php echo form_label('城市', 'city_id', array('class'=>'col-sm-3 control-label')); ?>
                    <div class="col-sm-9">
                        <select class="form-control select2" style="width: 100%;" name="city_id" id="city_id">
                          <option selected="selected" value="0">可选择城市</option>
                          <?php foreach ($cities as $city) : ?>
                          <option value="<?php echo $city->area_id; ?>" <?php echo set_select('city_id', $city->area_id, ($buildings->city_id ? : '')==$city->area_id); ?>><?php echo $city->area_name; ?></option>
                        <?php endforeach; ?>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                  <?php echo form_label('区县', 'district_id', array('class'=>'col-sm-3 control-label')); ?>
                    <div class="col-sm-9">
                        <select class="form-control select2" style="width: 100%;" name="district_id" id="district_id">
                          <option selected="selected" value="0">可选择区县</option>
                          <?php foreach ($districts as $district) : ?>
                          <option value="<?php echo $district->area_id; ?>" <?php echo set_select('district_id', $district->area_id, ($buildings->district_id ? : '')==$district->area_id); ?>><?php echo $district->area_name; ?></option>
                        <?php endforeach; ?>
                        </select>
                    </div>
                </div>
                
              </div>
              <!-- /.box-body -->
          </div>

          <div class="box box-primary">
            <div class="box-header with-border">
              <h3 class="box-title">开发商</h3>
            </div>
            <!-- /.box-header -->
              <div class="box-body form-horizontal">
                <div class="form-group">
                  <?php echo form_label('品牌', 'group_dev_id', array('class'=>'col-sm-3 control-label')); ?>
                    <div class="col-sm-9">
                        <select class="form-control select2" style="width: 100%;" name="group_dev_id" id="group_dev_id">
                          <option selected="selected" value="0">选择品牌</option>
                          <?php foreach ($devGroups as $devGroup) : ?>
                          <option value="<?php echo $devGroup->id; ?>" <?php echo set_select('group_dev_id', $devGroup->id, (isset($buildings->group_id) ? $buildings->group_id : '')==$devGroup->id); ?>><?php echo $devGroup->developer_name; ?></option>
                        <?php endforeach; ?>
                        </select>
                    </div>

                </div>
                <div class="form-group">
                  <?php echo form_label('公司名', 'developer_id', array('class'=>'col-sm-3 control-label')); ?>
                    <div class="col-sm-9">
                        <select class="form-control select2" style="width: 100%;" name="developer_id" id="developer_id">
                          <option selected="selected" value="0">可选择公司名</option>
                          <?php foreach ($developers as $developer) : ?>
                          <option value="<?php echo $developer->id; ?>" <?php echo set_select('developer_id', $developer->id, (isset($buildings->developer_id) ? $buildings->developer_id : '')==$developer->id); ?>><?php echo $developer->developer_name; ?></option>
                        <?php endforeach; ?>
                        </select>
                    </div>
                </div>
                
              </div>
              <!-- /.box-body -->
          </div>

          <div class="box box-primary">
            <div class="box-header with-border">
              <h3 class="box-title">楼盘分类</h3>
            </div>
            <!-- /.box-header -->
              <div class="box-body form-horizontal">
              <?php foreach ($categories as $category) : ?>
                <div class="form-group">
                    <div class="col-sm-12">
                        <input type="checkbox" class="minimal" name="category[]" value="<?php echo $category->tag_id; ?>" id="category_<?php echo $category->tag_id; ?>" <?php echo isset($category->selected) ? 'checked' : ''; ?> />
                        <?php echo form_label($category->tag_name, 'category_'.$category->tag_id, array()); ?>
                    </div>
                </div>
              <?php endforeach; ?>
                
              </div>
              <!-- /.box-body -->
          </div>

          <div class="box box-primary">
            <div class="box-header with-border">
              <h3 class="box-title">缩略图</h3>
              <div class="box-tools pull-right">
                <!-- <div class="pull-right" style="margin-bottom:20px;margin-top: 5px;"> -->
                  <div id="container">
                  <a href="javascript:;" class="btn btn-block btn-default" id="building_thumb"><i class="glyphicon glyphicon-plus"></i>选择图片</a>
                  </div>
                <!-- </div> -->
              </div>
            </div>
            
            <!-- /.box-header -->
              <div class="box-body form-horizontal">
                <div class="form-group">
                    <div class="col-sm-12">
                        <img src="<?php echo config_item("photo.domain").$thumbImg->url; ?>" id="building_thumb_img" style="width: 100%; " />
                        <input type="hidden" name="building_thumb_url" id="building_thumb_url" value="<?php echo $thumbImg->url; ?>" style="display:none;" />
                    </div>
                </div>
                
              </div>
              <!-- /.box-body -->
          </div>

          <div class="box box-primary">
            <div class="box-header with-border">
              <h3 class="box-title">开关设置</h3>
            </div>
            <!-- /.box-header -->
              <div class="box-body form-horizontal">

                <div class="form-group">
                    <div class="col-sm-12">
                        <input type="checkbox" class="minimal" name="phone_switch" value="<?php echo isset($buildingsInfoData->phone_switch) ? $buildingsInfoData->phone_switch : 1; ?>" id="phone_switch" <?php if($buildingsInfoData->phone_switch == 1): ?> checked <?php endif; ?> />
                        <?php echo form_label('开启电话', 'phone_switch', array()); ?>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-12">
                        <input type="checkbox" class="minimal" name="yuyue_switch" value="<?php echo isset($buildingsInfoData->yuyue_switch) ? $buildingsInfoData->yuyue_switch : 1; ?>" id="yuyue_switch" <?php if($buildingsInfoData->yuyue_switch == 1): ?> checked <?php endif; ?> />
                        <?php echo form_label('开启预约', 'yuyue_switch', array()); ?>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-12">
                        <input type="checkbox" class="minimal" name="hx_switch" value="<?php echo isset($buildingsInfoData->hx_switch) ? $buildingsInfoData->hx_switch : 1; ?>" id="hx_switch" <?php if($buildingsInfoData->hx_switch == 1): ?> checked <?php endif; ?> />
                        <?php echo form_label('开启户型', 'hx_switch', array()); ?>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-12">
                        <input type="checkbox" class="minimal" name="chat_switch" value="<?php echo isset($buildingsInfoData->chat_switch) ? $buildingsInfoData->chat_switch : 1; ?>" id="chat_switch" <?php if($buildingsInfoData->chat_switch == 1): ?> checked <?php endif; ?> />
                        <?php echo form_label('开启聊天', 'chat_switch', array()); ?>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-12">
                        <input type="checkbox" class="minimal" name="building_switch" value="<?php echo isset($buildingsInfoData->building_switch) ? $buildingsInfoData->building_switch : 1; ?>" id="building_switch" <?php if($buildingsInfoData->building_switch == 1): ?> checked <?php endif; ?> />
                        <?php echo form_label('开启楼盘推荐', 'building_switch', array()); ?>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-12">
                        <input type="checkbox" class="minimal" name="lingxi_switch" value="<?php echo isset($buildingsInfoData->lingxi_switch) ? $buildingsInfoData->lingxi_switch : 1; ?>" id="lingxi_switch" <?php if($buildingsInfoData->lingxi_switch == 1): ?> checked <?php endif; ?> />
                        <?php echo form_label('开启灵溪', 'lingxi_switch', array()); ?>
                    </div>
                </div>

              </div>
              <!-- /.box-body -->
          </div>

        </div>
        <?php echo form_close(); ?>
    </div>
</section>